<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'article-form',
        'enableAjaxValidation' => false,
            ));
    ?>

    <?php echo $form->errorSummary($model); ?>
    <fieldset>
        <legend>Basic Information</legend>
        <div class="row">
            <?php echo $form->labelEx($model, 'category_id'); ?>
            <?php echo $form->dropDownList($model, 'category_id', ArticleCategory::model()->getCategories()); ?>
            <?php echo $form->error($model, 'category_id'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'title'); ?>
            <?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 128)); ?>
            <?php echo $form->error($model, 'title'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'status'); ?>
            <?php echo $form->dropDownList($model, 'status', Lookup::items('ArticleStatus')); ?>
            <?php echo $form->error($model, 'status'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'tags'); ?>
            <?php echo $form->textField($model, 'tags', array('size' => 60, 'maxlength' => 128)); ?>
            <?php echo $form->error($model, 'tags'); ?>
        </div>
    </fieldset>
    <div class="row">
        <?php
        $this->widget('application.extensions.tinymce.ETinyMce', array('useSwitch' => false, 'editorTemplate' => 'full', 'language' => 'zh',
            'model' => $model, 'attribute' => 'content',
            'options' => array(
                'theme' => 'advanced', 'skin' => 'o2k7', 'skin_variant' => 'silver',
                'theme_advanced_resize_horizontal' => false, 'plugins' => 'syntaxhl', 'remove_linebreaks' => false,
                'extended_valid_elements' => 'textarea[cols|rows|disabled|name|readonly|class]',
                'theme_advanced_buttons1' => 'preview,bold,italic,underline,fontselect,fontsizeselect,link,justifyleft,justifycenter,justifyright,table,image,|,bullist,numlist,|,undo,redo,|,code,syntaxhl,fullscreen',
                'theme_advanced_buttons2' => '',
                'theme_advanced_buttons3' => '',
        )));
        ?>
        <?php echo $form->error($model, 'content'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div>